package com.ruoyi.worker.mapper.v2;

import com.ruoyi.worker.domain.v2.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface RzAttendanceSumDailyRecordDetailV2Mapper {

    /**
     * @author: 陈宇寰
     * @date: 2021-12-27 09:56:25
     * @params:
     * @return:
     * @description: 批量新增员工打卡记录
     */
    void multiInsert(List<RzAttendanceSumDailyRecordDetailV2Domain> domains);

    /**
     * @author: 陈宇寰
     * @date: 2021-12-28 14:28:19
     * @params:
     * @return:
     * @description: 查看当前日期是否存在
     */
    int exist(String date);


    Map<String, Integer> detailStatistics(@Param("date") String date,
                                          @Param("groupId") Integer groupId,
                                          @Param("deptId") Integer deptId,
                                          @Param("signType") Integer signType);

    /**
     * @author: 陈宇寰
     * @date: 2022-01-03 20:42:52
     * @params:
     * @return:
     * @description: 签到明细
     */
    List<RzAttendanceSumDailyDetailV2VO> detailStatistics2(RzAttendanceSumDailyDetailQueryParameterVO vo);

    /**
     * @author: 陈宇寰
     * @date: 2022-01-03 20:44:45
     * @params:
     * @return:
     * @description: 考勤调整
     */
    void updateSignResult(List<RzAttendanceSumDailyDetailUpdateVO> params);

    /**
     * @author: 陈宇寰
     * @date: 2022-01-04 10:36:26
     * @params:
     * @return:
     * @description: 历史记录
     */
    List<RzAttendanceSumDailyRecordDetailV2Domain> historyDatas(@Param("date") String date,
                                                                @Param("idCards") List<String> idCards,
                                                                @Param("signTypes") List<Integer> signTypes);

    List<Map<String, String>> cardDetail(@Param("date") String date, @Param("idCards") List<String> idCards);

    /**
     * @author: 陈宇寰
     * @date: 2022-01-05 09:28:47
     * @params:
     * @return:
     * @description: 确认
     */
    void confirmAttendanceDetail(@Param("date") String date, @Param("deptId") String deptId);

    /**
     * @author: 陈宇寰
     * @date: 2022-01-10 14:51:10
     * @params:
     * @return:
     * @description: 修改日考勤明细身份证号
     */
    void updateIdCardWhenBaseUpdate(@Param("oldIdCard") String oldIdCard, @Param("newIdCard") String newIdCard);

    /**
     * @author: 陈宇寰
     * @date: 2022-01-12 10:34:21
     * @params:
     * @return:
     * @description: 缺卡检查
     */
    Integer countAbsent(String date);

    /**
     * @author: 陈宇寰
     * @date: 2022-01-13 10:47:16
     * @params:
     * @return:
     * @description: 打卡时间
     */
    List<DailySignTimesVO> signTimes(@Param("startDate") String startDate, @Param("endDate") String endDate);
}
